{% extends 'myapp/base.html' %}

{% block main_body %}
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            模板管理-病人选择
            <small>电子病历系统</small>
        </h1>

        <ol class="breadcrumb">
                <div class="box-tools">
                    <form action="{% url 'myapp_patientinfo_search' %}" method="post">
                        {% csrf_token %}
                        <div class="input-group input-group-sm" style="width:150px;">
                          <input type="text" name="hspid" class="form-control pull-right" placeholder="编号">

                          <div class="input-group-btn">
                            <button type="submit" class="btn btn-default"><i class="fa fa-search"></i></button>
                          </div>
                        </div>
                    </form>
                </div>
        </ol>
        </section>

        <!-- Main content -->
        <section class="content container-fluid">

        <div class="row">
            <div class="col-xs-12">
            <div class="box">
                <div class="box-header">


                </div>
                <!-- /.box-header -->
                <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tr>
                    <th>操作</th>
                    <th>住院号</th>
                    <th>病人姓名</th>
                    <th>性别</th>
                    <th>科室</th>
                    <th>负责医生</th>
                    </tr>

                    {% for obj in patientinfolist %}
                    <tr>

                    <td>
                    <a href="records/{{ obj.hspid }}" class="btn btn-primary btn-xs" >进入编辑</a>

                    </td>
                    <td>{{ obj.hspid }}</td>
                    <td>{{ obj.name }}</td>
                    <td>{{ obj.gender }}</td>
                    <td>{{ obj.departname }}</td>
                    <td>{{ obj.doctorname }}</td>

                    </tr>

                    {% endfor %}
                </table>
                </div>

                </div>
            </div>
            <!-- /.box -->
            </div>

        </section>

{% endblock %}